<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			// console.log('App Show')
			this.getCode();
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			//获取存储code
			getCode() {
				wx.login({ 
					success: function(res) {
						// console.log(res)
						wx.setStorageSync('code', res.code)
					}
				})
			},
			getPhoneHeight() {
				let that = this
				uni.getSystemInfo({
					success: function(res) {
						that.globalData.phoneHeight = res.statusBarHeight
					}
				})
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
